package com.andova.glcamera.texture

import android.content.Context
import android.util.AttributeSet
import androidx.annotation.RequiresApi
import com.andova.glcamera.device.Camera1Device
import com.andova.glcamera.device.CameraCallback

@RequiresApi(21)
class ACamera1TextureView(context: Context, attrs: AttributeSet?) : CameraTextureView(context, attrs) {
    private var angle = 0
    private val device: Camera1Device by lazy { Camera1Device(context, angle) }
    fun setDisplayOrientation(angle: Int) {
        this.angle = angle
    }

    override fun getCamera(): CameraCallback = device
}